// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, getNoAuthRequest, postNoAuthRequest } from '@/libs/axios';

export const getTypicalClassification = () => {
  return postRequest('/typicalClassification')
}

export const getTypicalDesign = (params) => {
  return postRequest('/typicalDesign/getAllList', params)
}

export const getTypicalMaterials = (typical_design_id) => {
  return postRequest('/typicalMaterial/getList', typical_design_id)
}

export const getSysTypicalMaterials = (typical_design_id) => {
  return postRequest('/sysTypicalMaterial/getByDesignId', typical_design_id)
}

export const deleteTypicalMaterial = (id) => {
  return postRequest('/typicalMaterial/destroy', id)
}

export const deleteSysTypicalMaterial = (id) => {
  return postRequest('/sysTypicalMaterial/destroy', id)
}

export const getAllMaterialName = () => {
  return postRequest('/materialName/getAll')
}

export const getAllMaterials = () => {
  return postRequest('/materials/getAll')
}

export const getMaterialById = (id) => {
  return postRequest('/materials/getById', id)
}

export const insertTypicalMaterial = (params) => {
  return postRequest('/typicalMaterial/insert', params)
}

export const insertSysTypicalMaterial = (params) => {
  return postRequest('/sysTypicalMaterial/insert', params)
}

export const updateTypicalMaterial = (params) => {
  return postRequest('/typicalMaterial/update', params)
}

export const updateSysTypicalMaterial = (params) => {
  return postRequest('/sysTypicalMaterial/update', params)
}

export const getSysTypicalClass = () => {
  return postRequest('/sysTypicalClass/getSysAll')
}

export const getMyTypicalClass = () => {
  return postRequest('/sysTypicalClass/getMyAll')
}

export const getSysTypicals = (params) => {
  return postRequest('/sysTypicalDesign/getList', params)
}

export const getSysMaterials = (params) => {
  return postRequest('/sysTypicalMaterial/getByDesignId', params)
}

export const updateTypicalDesign = (params) => {
  return postRequest('/typicalDesign/update', params)
}

export const updateSysTypicalDesign = params => {
  return postRequest('/sysTypicalDesign/update', params)
}

export const getTypicalDesginByClass = params => {
  return postRequest('/typicalDesign/getAllByClass', params)
}

export const insertSysTypicalDesignFromTypical = params => {
  return postRequest('/sysTypicalDesign/insertFromTypical', params)
}

export const insertSysTypicalMaterialFromTypical = parent => {
  return postRequest('/sysTypicalMaterial/insertFromTypical', parent)
}

export const insertSysTypicalDesignFromSelf = params => {
  return postRequest('/sysTypicalDesign/insertFromSelf', params)
}

export const insertSysTypicalMaterialFromSelf = params => {
  return postRequest('/sysTypicalMaterial/insertFromSelf', params)
}

export const insertSysTypicalDesign = params => {
  return postRequest('/sysTypicalDesign/insert', params)
}

export const insetSysTypicalClass = params => {
  return postRequest('/sysTypicalClass/insert', params)
}